package com.hmall.common.client;

//import com.hmall.common.dto.AddressDTO;
import com.hmall.common.config.FeignConfig;
import com.hmall.common.dto.Address;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "userservice",configuration = FeignConfig.class)
public interface UserClient {
    @GetMapping("/address/{id}")
   public Address findAddressById(@PathVariable("id") Long id);

    @GetMapping("/user/deduce")
    boolean deduceBalance(@RequestParam("userId") Long userId, @RequestParam("totalFee")Long totalFee);
}
